// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addProjectDatasource POST /v1/easyapi/server/project/addProjectDatasource */
export async function addProjectDatasourceUsingPost(
  body: API.ProjectOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/project/addProjectDatasource', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** removeProjectDatasource POST /v1/easyapi/server/project/delProjectDatasource */
export async function removeProjectDatasourceUsingPost(
  body: API.ProjectOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/project/delProjectDatasource', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listProject POST /v1/easyapi/server/project/listProject */
export async function listProjectUsingPost(
  body: API.ProjectSearchParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListProjectListVo_>('/v1/easyapi/server/project/listProject', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** pageProject POST /v1/easyapi/server/project/pageProject */
export async function pageProjectUsingPost(
  body: API.ProjectPageParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageProjectVo_>('/v1/easyapi/server/project/pageProject', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** saveProject POST /v1/easyapi/server/project/saveProject */
export async function saveProjectUsingPost(
  body: API.AddProjectParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/project/saveProject', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
